<?php

namespace App\Http\Requests\Mini\Shop;

use Illuminate\Foundation\Http\FormRequest;

class OrderCreate extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return false;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'order' => 'required',
            'address_id' => 'required'
        ];
    }

    /**
     * 2021/3/11--9:37
     * @return array|void
     * @author:董宗澳
     * @email:2453611300
     * @wechat:DZA74941
     * @QQ:2453611300
     * @web:www.quzha.net
     * @method:messages
     * @effect:
     * 创建订单验证信息
     */
    public function messages()
    {
        return [
            'order.required' => '请传递商品信息',
            'address_id.required' => '请选择地址'
        ];
    }
}
